package cn.xfdzx.android.apps.shop.model;


import java.util.Map;

import cn.xfdzx.android.apps.shop.bean.GoodsLiblaryListBean;
import cn.xfdzx.android.apps.shop.bean.GoodsUpStateBeen;
import cn.xfdzx.android.apps.shop.bean.NewOrderBeen;
import cn.xfdzx.android.apps.shop.bean.OneCategoryBeen;
import cn.xfdzx.android.apps.shop.bean.OrderListBeen;
import cn.xfdzx.android.apps.shop.bean.ShopAddGoodTypeBeen;
import cn.xfdzx.android.apps.shop.bean.ShopInGoodListBeen;
import cn.xfdzx.android.apps.shop.bean.UpdateNumPriceBeen;
import cn.xfdzx.android.apps.shop.contract.OrderListContract;
import cn.xfdzx.android.apps.shop.contract.ShopInGoodListContract;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;
import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */
public class ShopInGoodListModel implements ShopInGoodListContract.Model {



    @Override
    public Flowable<ShopInGoodListBeen> initData( Map<String,Object> map) {
        return RetrofitClient.getInstance().getApi().store_goods_list(map);
    }

    @Override
    public Flowable<GoodsUpStateBeen> goodsUpState(String id, String state) {
        return RetrofitClient.getInstance().getApi().goods_upState(id,state);
    }
    @Override
    public Flowable<UpdateNumPriceBeen> updateNumPrice(String id, String marketprice, String stock, String discountprice) {
        return  RetrofitClient.getInstance().getApi().updateNumPrice(id,marketprice,stock,discountprice);
    }

    @Override
    public Flowable<GoodsLiblaryListBean> getLibraryList(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().getLibraryList(map);
    }

    @Override
    public Flowable<OneCategoryBeen> getOneCategory(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().oneCategory(map);
    }

    @Override
    public Flowable<OneCategoryBeen> addGoods(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().addGoods(map);
    }

    @Override
    public Flowable<ShopAddGoodTypeBeen> getCategory_list() {
        return  RetrofitClient.getInstance().getApi().category_list();
    }
}
